Skip to main content

Retrieve order details

Retrieves the order details with order number or merchant order number.


API URL

UAT : https://uat.test2pay.com/sgs/api/transfer/getTransferToBankOrder

Production : https://api.payby.com/sgs/api/transfer/getTransferToBankOrder


Request

Http Header


Attributes

Content-Language String

The language in which the response message will be used, currently only English is supported.

Example value: en

Maximum length: 10


Content-Type String Required

The media type. Required for operations with a request body. The value is application/<format>, where format is json.

Example value: application/json


sign String Required

Requests should be signed using private-key cryptography. This allows the payment gateway to verify that an incoming request is really from your application.


Partner-Id String Required

The merchant id of your account.

Example value: 200001200101

Maximum length: 12


Http Body


requestTime Timestamp Required

If the request time is more than 15 minutes away from the current time, the request will be rejected. This parameter is used to prevent repeated requests for orders that should have been cancelled due to timeouts.

Example value: 1581493898000


bizContent Object

You can use either refundMerchantOrderNo or orderNo to specify an order. But you can't use the two parameters at the same time.

  • refundMerchantOrderNo String Required

    The merchant's referece number of the request. Used to track every request.

    Example value: M965739182419

    Maximum length: 64


  • orderNo String Required

    The PayBy's unique identify number of the order.

    Example value: 131658300517875854


Request sample

Http Header
{
"Content-Language": "en",
"Content-Type": "application/json",
"Partner-Id": "200000018128",
"sign": "RXF8WmC67QSnr62l3oU33fjpUvAo6Yrgvk05c/vYLtmHRGMoAH4qSnap2pto3mY7KgyP5wkNUsyQXJ/ZwbfccSONLb5zA7Z7q74IsOwdJw3BKXxVWr4tfjkA02Pfcp0cZWjE/Y8jTcbtgdc5VI90LNmkgPWbrSlDbNW8p3NlhnKg+Xfl95SgMBPF9afttsU/2a5jLnZXSVcXoSthxpJ6XkZwd45+jhOjBguT+IC8uLVSNRvwDisRGgf9PYv39OH6ITEhbY2sgjkdzBZBOZlt7awy2vkMEsePsuafwrNhuz7xzjj55PzNzk8+zCUu/791OhC/eFUyGimtDw5mX9cyQw=="
}

Http Body
{
"body": {
"bizContent": {
"merchantOrderNo": "M536433721888"
},
"requestTime": 1585142880000
}
}

Response

Http Header


sign String Required

When PayBy sends response, PayBy will use its own private key to sign the message, and the merchant uses PayBy 's public key to verify the signature. If the verification is passed, it proves that the response was sent by PayBy and not faked by others.


Http Body


head

Attributes
  • applyStatus Enum Required

    The result of the request. The possible values are:

    SUCCESS - Application successful. FAIL - Application failed. Check the code and msg for exact reason. ERROR - Application error. The signature verification failed. Please check whether the private key used for the signature and the public key uploaded on the PayBy portal are one key pair.


  • code String Required

    Response Codes.

    Example value: 0


  • msg String

    Description of this code.


  • traceCode String

    No special meaning, PayBy internally used to locate the error.



body

Notice

Body is returned only when applystatus = success, and code = 0. If applystatus = error or failed; or applystatus = success, code !=0 , that indicates an error. Please check errors and try again.

  • transferToBankOrder Object

    Attributes
    • merchantOrderNo String Required

      The merchant's referece number of the request. Used to track every request.

      Example value: M965739182419

      Maximum length: 64


    • orderNo String Required

      The merchant's referece number of the request. Used to track every request.

      Example value: M965739182419

      Maximum length: 64


    • holderName String Required

      The hloder name of the beneficiary account. The parameter needs to be encrypted when passed, and SHA-256 algorithm is recommended.

      Maximum length: 100


    • iban String

      The IBAN number of the beneficiary account. The parameter needs to be encrypted when passed, and SHA-256 algorithm is recommended.

      Maximum length: 34


    • swiftCode String

      A SWIFT code consists of 8-11 characters and follows a format that identifies the benificiary account's bank, country, location, and branch.

      Maximum length: 11


    • beneficiaryAddress String Required

      1. If the benificiary account is a personal account, the beneficiary address must be passed, and the sum of the characters of the two values of holderName and beneficiaryAddress cannot exceed 140, otherwise the transfer may fail.

      2. Only the following characters are allowed to pass, if the parameter contains other characters, the response will be error: a - z A - Z 0 - 9 / . -

      3. The parameter needs to be encrypted when passed, and SHA-256 algorithm is recommended.

        Example value: Liwa Street off Khaliffa Stree

        Maximum length: 140

      Example value: Liwa Street off Khaliffa Stree

      Maximum length: 140


    • amount Money Required

      How much AED do you want to transfer. The currency code must be AED.


    • memo String Required

      The description of this transfer.

      Maximum length: 128


    • notifyUrl String

      To receive asynchronous notifications of order status updates, you can pass the notify URL.

      Example value: https://www.yoursite.com

      Maximum length: 200


    • accountNo String

      Bank account number of the beneficiary account.

      Example value: 2000000000001

      Maximum length: 64


    • networkCode String

      The code of which transfer network is used in this payout. The default value is LOCAL.

      Example value: LOCAL, SWIFT

      Maximum length: 20


    • bankName String

      The bank name of the beneficiary account.

      Example value: First Abu Dhabi Bank PJSC

      Maximum length: 64


    • countryCode String

      The code of the country where the bank of the beneficiary account belongs. The default value is UAE.

      Example value: UAE, SG, US, etc.

      Maximum length: 16


    • fundoutCurrencyCode String

      In this payout, the currency of the funds received by the beneficiary account. The default value is AED.

      Example value: AED, USD.

      Maximum length: 16


    • fedwireCode String

      A Fedwire (or ABA) code is a bank code used in the United States, which identifies financial institutions. Fedwire/ABA codes are always nine (9) digits in length.

      Example value: 133563585

      Maximum length: 9


    • branchName String

      The branch name of the bank of the beneficiary account.

      Example value: Mall of the Emirates Branch

      Maximum length: 35


    • intermediaryBank String

      An intermediary bank is required when making international funds transfers between the originator bank and the beneficiary bank. This only happens when the banks don’t have an established relationship, such as an account that would otherwise facilitate a direct deposit in a SWIFT network.

      Example value: iPhone

      Maximum length: 12


    • beneficiaryType String

      In this payout method, what type of code is used to identify the beneficiary account or the bank to which the beneficiary account belongs.

      Example value: IBAN, BBAN.

      Maximum length: 16


Response sample

Http Header
{
"sign": "VvlCywDHE0Pi35ypeJymje1GWHbDPhy3UJqPZTLnM0QqFa3QW+Yzc25kgsrB9t58c2oRdWo+stcvMhOeOgbrXNOhLAECD5bpSr2L1xEVhowd1k8tNlq+w2WhzUM0A77YVO2wapqqtBvsFi09o/ix7gCyX+850oLLxEEbbBR48fufVJxcOQ4y7bdkSufd+9gY4vdcJYMmnToSVQ72ObekhyZiXhT5zfnHjbFYGGpRXh/HvDiE+OGdTDYmHH4Ui+funH9kCg291/pWIV8Yp0hIQJ29cuJyCYsm1brkLopU1eak7fgculNo5SnCZH9nTIHYsIQtsMAXgI8q0MecBR2ovw=="
}

Http Body
{
"head": {
"applyStatus": "SUCCESS",
"code": "0",
"msg": "SUCCESS",
"traceCode": "1133"
},
"body": {
"transferToBankOrder": {
"amount": {
"amount": 0.01,
"currency": "AED"
},
"holderName": "00d74f270d2251e8fa6e7f3b1ea06bd3b5f32dfe4719f9df60982c55b24e4898",
"iban": "1fc44f25c178c422f705054c669cfa6133f6dc8e1fe24b3d96f847667db8b92c", "beneficiaryAddress": "ec36f7ed0f1095595da9a506c1cb352c9b89b69c4ceb2c562128c7241661afde",
"memo": "Your memo",
"merchantOrderNo": "M536433721888",
"notifyUrl": "http://www.yoursite.com",
"orderNo": "911585133415003759",
"paymentInfo": {
"arrivalTime": 1585133416000,
"payerFeeAmount": {
"amount": 0,
"currency": "AED"
}
},
"product": "Transfer To Bank",
"requestTime": 1585133415287,
"status": "SUCCESS",
"swiftCode": "BBMEAEAD"
}
}
}